home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
100 Free Apps - The Best Freeware for the Mac!
/
100 Free Apps The best freeware for the Mac!.iso
/
Data
/
Software
/
Featured Products
/
slashdock2.4.dmg.sit
/
slashdock2.4.dmg
/
fixnewsisfree.pl
< prev
next >
Wrap
Perl Script
|
2004-07-29
|
687b
|
31 lines
#!/usr/bin/perl
# to run this script, open Terminal and run: perl [location to this script]
%CONVERSION_PATTERNS =
(
'www.newsisfree.com/HPE/xml' => 'xml.newsisfree.com',
);
# process the SlashDockConfig.plist file
open(JPIPE, 'find ~/Library/Preferences/ -name "SlashDock.config.plist" -print |');
@configfiles = <JPIPE>;
close(JPIPE);
foreach $file (@configfiles) {
print $file;
chomp $file;
open(FILE, $file);
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
my $sstr, $rstr;
while (($sstr,$rstr)=each(%CONVERSION_PATTERNS)) {
$line =~ s/$sstr/$rstr/g;
}
}
close(FILE);
open(FILE, ">$file");
print FILE @lines;
close(FILE);
}